package com.whlilong.jxc.mina.exchange;

import org.apache.mina.core.service.IoHandler;
import org.apache.mina.core.service.IoHandlerAdapter;
import org.apache.mina.core.session.IoSession;
import com.whlilong.jxc.service.exchange.ITransferMessage;

public class MessageReceiveHandler extends IoHandlerAdapter implements IoHandler{

	@Override
	public void messageReceived(IoSession iosession, Object obj)
			throws Exception {
		ITransferMessage message = (ITransferMessage)obj;
		System.out.println(message.getMessageBody());
		iosession.close(true);
	}

}
